<div class="ribbon">
    <a href=""><span class="home fa fa-home"></span></a>
    <ol class="breadcrumb">
        <li>优惠券列表</li>
    </ol>
</div>

<div class="table-wrapper">

    <div class="toolbar">
        <form role="form">
            <div class="row">
                <div class="col-md-11">
                    <div class="col-md-12">
                        <label class="input">使用状态：</label>
                        <label class="input"><select  ng-model="q.useStatus" ng-options="useStatus.name for useStatus in vm.useStatusList" class="form-control" ng-selected="" ng-change="couponStatusChange()"></select></label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <label class="input">优惠券编号：</label>
                        <label class="input"><input type="text"  class="form-control" ng-model="q.couponSn"></label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label class="input">客户ID：</label>
                        <label class="input"><input type="text"  class="form-control" ng-model="q.customerUserId"></label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label class="input">时间：</label>
                        <label class="input"><input type="text"  id="datetimepickerStart"  class="form-control" ng-model="q.startTime"></label>
                        <label class="input">—</label>
                        <label class="input"><input type="text"  id="datetimepickerEnd"  class="form-control" ng-model="q.endTime"></label>
                        <button title="删除时间" ng-click="deleteTimeRange()" type="button" class="btn btn-primary btn-outline btn-xs">
                            <i class="fa fa-trash-o"></i>
                        </button>
                    </div>
                </div>
                <div class="col-md-1">
                    <button  ng-click="search()" class="btn btn-md btn-primary pull-right"><i class="fa fa-search"></i> 搜索 </button>
                </div>
            </div>
        </form>
    </div>
    <table class="table table-striped table-hover props table-sm">
        <thead>
        <tr>
            <th width="1%"></th>
            <th width="3%">序号</th>
            <th width="11%">优惠券编号</th>
            <th width="5%">客户ID</th>
            <th width="5%">客户姓名</th>
            <th width="5%">办理人ID</th>
            <th width="5%">办理人姓名</th>
            <th width="5%">优惠券规格</th>
            <th width="5%">优惠券面值(元)</th>
            <th width="5%">使用状态</th>
            <th width="8%">使用时间</th>
            <th width="8%">有效期起始</th>
            <th width="8%">有效期结束</th>
            <th width="8%">创建时间</th>
            <!--<th width="15%">操作</th>-->
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="coupon in vm.couponList">
            <td></td>
            <td class="message">{{$index+1+pager.pageSize*(pager.getCurPageNo()-1)}}</td>
            <td class="message">{{coupon.couponSn}}</td>
            <td class="message">{{coupon.customer.userId}}</td>
            <td class="message">{{coupon.customer.name}}</td>
            <td class="message">{{coupon.operator.userId}}</td>
            <td class="message">{{coupon.operator.name}}</td>
            <td class="message">{{coupon.specName}}</td>
            <td class="message">{{coupon.price}}</td>
            <td class="message">{{coupon.couponStatus.name}}</td>
            <td class="message">{{coupon.useTime}}</td>
            <td class="message">{{coupon.startDate}}</td>
            <td class="message">{{coupon.endDate}}</td>
            <td class="message">{{coupon.createTime}}</td>
        </tr>
        </tbody>
    </table>
    <div ng-if="vm.couponList.length == 0" nj-table-no-data></div>
    <div nj-pager pager="pager"></div>
</div>
